﻿using Microsoft.Popfly.GameCreator.GameEngine.Events;

namespace Microsoft.Popfly.GameCreator.GameEngine.Behaviors
{
    public class SoundBehavior : IBehavior
    {
        private Game m_game;
        private string m_url;

        public SoundBehavior(Game game, string url)
        {
            m_game = game;
            m_url = url;
        }
        public void Invoke(BehaviorOwner sender, PGCEventArgs args)
        {
            m_game.PlayAudio(m_url);
        }
    }
}